package com.kiki.singer.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.kiki.singer.mapper.SingerMapper;
import com.kiki.singer.domain.Singer;
import com.kiki.singer.service.ISingerService;

/**
 * 歌手基础信息Service业务层处理
 * 
 * @author 林志毅
 * @date 2025-01-09
 */
@Service
public class SingerServiceImpl implements ISingerService 
{
    @Autowired
    private SingerMapper singerMapper;

    /**
     * 查询歌手基础信息
     * 
     * @param singerId 歌手基础信息主键
     * @return 歌手基础信息
     */
    @Override
    public Singer selectSingerBySingerId(Long singerId)
    {
        return singerMapper.selectSingerBySingerId(singerId);
    }

    /**
     * 查询歌手基础信息列表
     * 
     * @param singer 歌手基础信息
     * @return 歌手基础信息
     */
    @Override
    public List<Singer> selectSingerList(Singer singer)
    {
        return singerMapper.selectSingerList(singer);
    }

    /**
     * 新增歌手基础信息
     * 
     * @param singer 歌手基础信息
     * @return 结果
     */
    @Override
    public int insertSinger(Singer singer)
    {
        return singerMapper.insertSinger(singer);
    }

    /**
     * 修改歌手基础信息
     * 
     * @param singer 歌手基础信息
     * @return 结果
     */
    @Override
    public int updateSinger(Singer singer)
    {
        return singerMapper.updateSinger(singer);
    }

    /**
     * 批量删除歌手基础信息
     * 
     * @param singerIds 需要删除的歌手基础信息主键
     * @return 结果
     */
    @Override
    public int deleteSingerBySingerIds(Long[] singerIds)
    {
        return singerMapper.deleteSingerBySingerIds(singerIds);
    }

    /**
     * 删除歌手基础信息信息
     * 
     * @param singerId 歌手基础信息主键
     * @return 结果
     */
    @Override
    public int deleteSingerBySingerId(Long singerId)
    {
        return singerMapper.deleteSingerBySingerId(singerId);
    }

    @Override
    public List<Singer> listSingerByKeyWord(String keyword) {
        System.out.println("获取的关键词为："+keyword);
        System.out.println("调用接口"+singerMapper.listSingerByKeyWord(keyword));
        return singerMapper.listSingerByKeyWord(keyword);
    }
}
